package com.dataart.training.crimequalification.service;


import com.dataart.training.crimequalification.entity.UserEntity;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.core.AuthenticationException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public interface AuthenticationService {

    public boolean doProgrammaticLogin(HttpServletRequest request, AuthenticationManager authenticationManager,
                                       String username, String password);

    public boolean isAuthenticationPerformed();

    public String getLoggedInUserName() throws AuthenticationException;

    public UserEntity getCurrentLoggedInUser(UserService userService);

    public void doProgrammaticLogout(HttpServletRequest request, HttpServletResponse response) throws Exception;

}
